import request from '@/utils/request'

// 查询设备管理列表
export function listManage(query) {
  return request({
    url: '/system/manage/list',
    method: 'get',
    params: query
  })
}
export function getCover(){
    return request({
      url:'/system/cover/getCode',
      method:'get'
    })
}
export function upLoad(fileData){
  return request({
    url:'/common/uploads',
    method:'post',
    params: fileData
  })
}
// 查询设备管理详细
export function getManage(id) {
  return request({
    url: '/system/manage/' + id,
    method: 'get'
  })
}

// 新增设备管理
export function addManage(data) {
  return request({
    url: '/system/manage',
    method: 'post',
    data: data
  })
}

// 修改设备管理
export function updateManage(data) {
  return request({
    url: '/system/manage',
    method: 'put',
    data: data
  })
}

// 删除设备管理
export function delManage(id) {
  return request({
    url: '/system/manage/' + id,
    method: 'delete'
  })
}
//图片上传
export function upload() {
  return request({
    url: '/system/manage/upload',
    method: 'delete'
  })
}
// 用户查询，设备负责人下拉框
export function userList(query) {
  return request({
    url: '/system/manage/userlist',
    method: 'get',
    params: query
  })
}
//井盖编号
export function listCoverNum(query) {
  return request({
    url: '/system/manage/listCoverNum',
    method: 'get',
    params: query
  })
}
//设备类型
export function listDeviceName(query) {
  return request({
    url: '/system/manage/listDeviceName',
    method: 'get',
    params: query
  })
}
